<div ng-controller="PartHistoryController">
    <div class="row pad_top" ng-if="history.data.length===0">
        <div class="col-md-12">
            <i class="text-muted">No history available</i>
        </div>
    </div>

    <div class="row pad_top" ng-if="history && history.resultCount">
        <div class="col-md-12">
            <table cellspacing="0" class="table table-condensed table-hover table-border-bottom font-95em">
                <thead>
                <tr>
                    <th></th>
                    <th class="entry-table-header"><b>Action</b></th>
                    <th class="entry-table-header"><b>By</b></th>
                    <th class="entry-table-header"><b>On</b></th>
                    <th ng-if="user.isAdmin">&nbsp;</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="item in history.data">
                    <td style="line-height:1; opacity:0.2; text-shadow:0 1px 0 #fff;"><b>{{$index+historyParams.offset+1
                        | number}}</b></td>
                    <td ng-if="item.action==='+r'"><i class="fa fa-eye"></i> Read</td>
                    <td><a ng-href="profile/{{item.account.id}}">{{item.account.firstName}}
                        {{item.account.lastName}}</a></td>
                    <td>{{item.time | date:'MMM d, y, h:mm a'}}</td>
                    <td style="font-size:14px" ng-if="user.isAdmin">
                        <i ng-click="deleteHistory(item)" class="fa fa-trash-o delete_icon"></i>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>

        <div class="col-sm-6">
            <uib-pagination total-items="history.resultCount" ng-change="historyPageChanged()"
                            ng-model="historyParams.currentPage"
                            max-size="historyParams.maxSize" class="pagination-sm" items-per-page="historyParams.limit"
                            boundary-links="true">
            </uib-pagination>
        </div>

        <div class="col-md-6" style="margin-top: 25px;">
            <strong class="small">{{pageCounts(historyParams.currentPage, history.resultCount, 10)}}</strong>
        </div>
    </div>
</div>